package com.bnz.text;


import com.bnz.pojo.Student;
import com.bnz.service.StudentService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:spring/applicationContext.xml")
public class TextCommonMapper {

    @Autowired
    private StudentService studentService;

    @Test
    public void text01(){
        List<Student> all = studentService.findAll();
        for (Student student : all) {
            System.out.println(student);
        }
    }
}
